***************************************************************************
matrix b=e(b)
local names: colfullnames b
matrix V=e(V)
forvalues i=1/$dep {
local b`i'=round(b[1,`i'],0.00001)
local t_b`i'=round(b[1,`i']/sqrt(V[`i',`i']),0.01)
local pneg`i'=1-ttail($obs-1,b[1,`i']/sqrt(V[`i',`i']))
local ppos`i'=ttail($obs-1,b[1,`i']/sqrt(V[`i',`i']))
local p`i'=round(2*(1-norm(abs(b[1,`i']/sqrt(V[`i',`i'])))),0.0001)


}
matrix results$numvar=J($dep+2,4,.)
matrix colnames results$numvar= b t-stat p-value
matrix rownames results$numvar=`names' obs R2_a

log using test3, append
*matlist b
disp "Dependent_Variable $depname"
forvalues i=1/$dep {
local name`i': word `i' of `names'
disp "`name`i''" " " `b`i'' " "  `t_b`i'' " " `ppos`i'' " " `pneg`i''
mat results$numvar[`i',1]=`b`i''
mat results$numvar[`i',2]=`t_b`i''
mat results$numvar[`i',3]=`ppos`i''
mat results$numvar[`i',4]=`pneg`i''

}
disp "R2_a" " " $adj_r2 "%"
disp "obs" " " $obs
mat results$numvar[$dep+1,1]=$adj_r2
mat results$numvar[$dep+2,1]=$obs



log close
***************************************************************************

